|
2wirespiiso 2.2.0
|
API for configuring and manipulating 2-Wire SPI ISO Click driver. More...
Topics | |
| 2-Wire SPI ISO Settings | |
| Settings of 2-Wire SPI ISO Click driver. | |
| 2-Wire SPI ISO MikroBUS Map | |
| MikroBUS pin mapping of 2-Wire SPI ISO Click driver. | |
Functions | |
| void | c2wirespiiso_cfg_setup (c2wirespiiso_cfg_t *cfg) |
| 2-Wire SPI ISO configuration object setup function. | |
| err_t | c2wirespiiso_init (c2wirespiiso_t *ctx, c2wirespiiso_cfg_t *cfg) |
| 2-Wire SPI ISO initialization function. | |
| void | c2wirespiiso_default_cfg (c2wirespiiso_t *ctx) |
| 2-Wire SPI ISO default configuration function. | |
| err_t | c2wirespiiso_write (c2wirespiiso_t *ctx, uint8_t *data_in, uint8_t in_len) |
| 2-Wire SPI ISO write function. | |
| err_t | c2wirespiiso_read (c2wirespiiso_t *ctx, uint8_t *data_out, uint8_t out_len) |
| 2-Wire SPI ISO read function. | |
| err_t | c2wirespiiso_write_then_read (c2wirespiiso_t *ctx, uint8_t *data_in, uint8_t in_len, uint8_t *data_out, uint8_t out_len) |
| 2-Wire SPI ISO write then read function. | |
| void | c2wirespiiso_disable_device (c2wirespiiso_t *ctx) |
| 2-Wire SPI ISO disable device function. | |
| void | c2wirespiiso_enable_device (c2wirespiiso_t *ctx) |
| 2-Wire SPI ISO enable device function. | |
| void | c2wirespiiso_disable_tx (c2wirespiiso_t *ctx) |
| 2-Wire SPI ISO disable tx function. | |
| void | c2wirespiiso_enable_tx (c2wirespiiso_t *ctx) |
| 2-Wire SPI ISO enable tx function. | |
| uint8_t | c2wirespiiso_get_bne_pin (c2wirespiiso_t *ctx) |
| 2-Wire SPI ISO get bne pin function. | |
API for configuring and manipulating 2-Wire SPI ISO Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
| void c2wirespiiso_cfg_setup | ( | c2wirespiiso_cfg_t * | cfg | ) |
2-Wire SPI ISO configuration object setup function.
This function initializes Click configuration structure to initial values.
| [out] | cfg | : Click configuration structure. See c2wirespiiso_cfg_t object definition for detailed explanation. |
| void c2wirespiiso_default_cfg | ( | c2wirespiiso_t * | ctx | ) |
2-Wire SPI ISO default configuration function.
This function executes a default configuration of 2-Wire SPI ISO Click board.
| [in] | ctx | : Click context object. See c2wirespiiso_t object definition for detailed explanation. |
| void c2wirespiiso_disable_device | ( | c2wirespiiso_t * | ctx | ) |
2-Wire SPI ISO disable device function.
This function disables the device by setting the DIS pin to HIGH logic state.
| [in] | ctx | : Click context object. See c2wirespiiso_t object definition for detailed explanation. |
| void c2wirespiiso_disable_tx | ( | c2wirespiiso_t * | ctx | ) |
2-Wire SPI ISO disable tx function.
This function disables the transmitter by setting the TXEN pin to LOW logic state.
| [in] | ctx | : Click context object. See c2wirespiiso_t object definition for detailed explanation. |
| void c2wirespiiso_enable_device | ( | c2wirespiiso_t * | ctx | ) |
2-Wire SPI ISO enable device function.
This function enables the device by setting the DIS pin to LOW logic state.
| [in] | ctx | : Click context object. See c2wirespiiso_t object definition for detailed explanation. |
| void c2wirespiiso_enable_tx | ( | c2wirespiiso_t * | ctx | ) |
2-Wire SPI ISO enable tx function.
This function enables the transmitter by setting the TXEN pin to HIGH logic state.
| [in] | ctx | : Click context object. See c2wirespiiso_t object definition for detailed explanation. |
| uint8_t c2wirespiiso_get_bne_pin | ( | c2wirespiiso_t * | ctx | ) |
2-Wire SPI ISO get bne pin function.
This function returns the RX buffer not empty (BNE) pin logic state.
| [in] | ctx | : Click context object. See c2wirespiiso_t object definition for detailed explanation. |
| err_t c2wirespiiso_init | ( | c2wirespiiso_t * | ctx, |
| c2wirespiiso_cfg_t * | cfg ) |
2-Wire SPI ISO initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
| [out] | ctx | : Click context object. See c2wirespiiso_t object definition for detailed explanation. |
| [in] | cfg | : Click configuration structure. See c2wirespiiso_cfg_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t c2wirespiiso_read | ( | c2wirespiiso_t * | ctx, |
| uint8_t * | data_out, | ||
| uint8_t | out_len ) |
2-Wire SPI ISO read function.
This function reads a desired number of data bytes by using SPI serial interface.
| [in] | ctx | : Click context object. See c2wirespiiso_t object definition for detailed explanation. |
| [out] | data_out | : Output read data. |
| [in] | out_len | : Number of bytes to be read. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t c2wirespiiso_write | ( | c2wirespiiso_t * | ctx, |
| uint8_t * | data_in, | ||
| uint8_t | in_len ) |
2-Wire SPI ISO write function.
This function writes a desired number of data bytes by using SPI serial interface.
| [in] | ctx | : Click context object. See c2wirespiiso_t object definition for detailed explanation. |
| [in] | data_in | : Data to be written. |
| [in] | in_len | : Number of bytes to be written. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t c2wirespiiso_write_then_read | ( | c2wirespiiso_t * | ctx, |
| uint8_t * | data_in, | ||
| uint8_t | in_len, | ||
| uint8_t * | data_out, | ||
| uint8_t | out_len ) |
2-Wire SPI ISO write then read function.
This function writes and then reads a desired number of data bytes by using SPI serial interface.
| [in] | ctx | : Click context object. See c2wirespiiso_t object definition for detailed explanation. |
| [in] | data_in | : Data to be written. |
| [in] | in_len | : Number of bytes to be written. |
| [out] | data_out | : Output read data. |
| [in] | out_len | : Number of bytes to be read. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation.